package com.java1412.order.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;

/**
 * @author java1412
 * @since 2024-01-16 15:06:13
 */
@FeignClient(value = "mall-goods") // value表示的是注册中心的名称
public interface GoodsService {

    /**
     * feign客户端的请求路径
     *
     * @param goodsId
     * @return
     */
    @RequestMapping(value = "/api/v1/goods/findByGoodsId")
    public Object findByGoodsId(@RequestParam("goodsId") Integer goodsId);

    /**
     * 测试负载均衡策略
     *
     * @return
     */
    @GetMapping(value = "/api/v1/goods/findClusterName")
    public String findClusterName();
}
